CXX=icc -O3
CFLAGS =  -I${SCHEDULER_INSTALL_PATH}/include -L${SCHEDULER_INSTALL_PATH}/lib

SCHEDULER_INSTALL_PATH=${DAG_HOME}

DAG_LIBFLAGS = -ltbb -ldag_task_scheduler $(LIBFLAGS)
LIBFLAGS = -lm -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
#LIBFLAGS = -lmkl_rt

all:  dag

dag:
	$(CXX) $(CFLAGS) -L../boost/stage/lib -pthread -o cholesky_dag cholesky_dag.cpp $(DAG_LIBFLAGS)

chuan:
	$(CXX) -o cholesky cholesky.cpp $(LIBFLAGS)

omp: 
	$(CXX) -fopenmp -o cholesky_omp cholesky_omp.cpp $(LIBFLAGS)

task:
	$(CXX) -fopenmp -o cholesky_task cholesky_task.cpp $(LIBFLAGS)
.PHONY:clean
clean:
	@-rm -f cholesky_omp cholesky_dag cholesky cholesky_task *jpg *png *csv loop_dep* 
